forked from TheAlgorithms/C-Plus-Plus
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from TheAlgorithms:master #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* feat: add Kelvin to Celsius conversion algorithm * updating DIRECTORY.md * chore: apply suggestions from code review Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com> * chore: apply suggestions from code review Co-authored-by: Piotr Idzik <vil02@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com> Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com> Co-authored-by: Piotr Idzik <vil02@users.noreply.github.com>
* feat: add memory game and a games folder * fix: `clang-tidy` warnings (hopefully) * fix: use `random_shuffle` `random_shuffle` was removed in C++17, however, we're using C++11 here, so there should be no harm. * updating DIRECTORY.md * clang-format and clang-tidy fixes for 8cd0a77 * fix: remove repeated `random` header * clang-format and clang-tidy fixes for 0278688 * fix: Windows build errors * fix: CI warnings (hopefully) * fix: CI warnings * fix: (finally) CI warnings * fix: wrong parameter name * fix: yet another attempt to fix CI --------- Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
...`scripts` repository
* feat: add sha256 algorithm * Apply suggestions from code review Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com> * fix: suggested changes * updating DIRECTORY.md * clang-format and clang-tidy fixes for de9c0b9 * fix: suggested changes * fix: suggested changes * clang-format and clang-tidy fixes for 86e65fe * fix: suggested changes Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com> * Update hashing/sha256.cpp Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com> * fix: suggested changes * fix: Apply suggestions from code review Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com> * clang-format and clang-tidy fixes for a3d7333 * fix: suggested changes * fix: made some required changes * fix: suggested changes * fix: Apply suggestions from code review Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com> * clang-format and clang-tidy fixes for 356be83 * fix: suggested changes * fix: added more tests * fix: Apply suggestions from code review Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com> * fix: suggested changes * chore: apply suggestions from code review * chore: add print message after tests * clang-format and clang-tidy fixes for 48191bb * fix: suggested changes --------- Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com> Co-authored-by: David Leal <halfpacho@gmail.com> Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* Quality of life update FIX: added namespace math, changed for a weird for loop to a while loop with a better conditional and I initiation CHORE: Cleaned documentation and added details plus links. removed the invalid cout lines in test for one line. * Update math/check_factorial.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_factorial.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_factorial.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_factorial.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update math/check_factorial.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update math/check_factorial.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update math/check_factorial.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update math/check_factorial.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * chore: apply suggestions from code review * Updated last return in is_factorial * Update math/check_factorial.cpp Co-authored-by: David Leal <halfpacho@gmail.com> --------- Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> Co-authored-by: David Leal <halfpacho@gmail.com>
* check_prime_update docs: added links to file @brief and @details. moved previous @brief to be with function, made comments easier to read in general and added boilerplate documentation to functions. chore: removed bool result and most brackets in is_prime. Moved assert tests to their own function and added more in, test success now returns message. * Delete cmake-build-debug directory * clang-format * original box_stacking documentation start point * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Delete box_stacking.cpp * Update check_prime.cpp improved files @details text, removed generic t template - replaced with long long * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update check_prime.cpp removed cin/cout interaction * Update check_prime.cpp * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_prime.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_prime.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update check_prime.cpp * Update math/check_prime.cpp Co-authored-by: David Leal <halfpacho@gmail.com> --------- Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> Co-authored-by: David Leal <halfpacho@gmail.com>
* add boyer moore algorithm implementation * add a one-line description of what the library/header is for * fix comments pattern and make tests static * add documentation * add namespaces * fix all warnings for clang-tydy.exe <filename> * Change lib from limits to climits (CHAR_MAX macro) Co-authored-by: David Leal <halfpacho@gmail.com> * Add breif description of boyer-moore algorithm * Fix styling * Add needed documentation * my commit * fix type of index_pattern * Fix clang-warnings * chore: apply suggestions from code review * chore: add print message after tests * Update strings/boyer_moore.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update strings/boyer_moore.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update strings/boyer_moore.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update strings/boyer_moore.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update strings/boyer_moore.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update strings/boyer_moore.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update strings/boyer_moore.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update strings/boyer_moore.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update strings/boyer_moore.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: variable name * Update strings/boyer_moore.cpp Co-authored-by: David Leal <halfpacho@gmail.com> --------- Co-authored-by: David Leal <halfpacho@gmail.com> Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* update cmake version * clang-format and clang-tidy fixes for 402c562 --------- Co-authored-by: David Leal <halfpacho@gmail.com> Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
* fix: fit armstrong_number.cpp to guidelines * chore: delete unnecessary whitespace * updating DIRECTORY.md * fit: aliquot_sum to contribution guidelines added a math formula * chore: add print statement mentioning tests have passed * Update math/armstrong_number.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update math/armstrong_number.cpp Co-authored-by: David Leal <halfpacho@gmail.com> --------- Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com> Co-authored-by: David Leal <halfpacho@gmail.com>
* Next higher number with same set bits implimented * Added to DIRECTORY.md * Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp new line aded Co-authored-by: David Leal <halfpacho@gmail.com> * Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp * added Co-authored-by: David Leal <halfpacho@gmail.com> * Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp recomendation added Co-authored-by: David Leal <halfpacho@gmail.com> * Update next_higher_number_with_same_number_of_set_bits.cpp int to int64_t * Update bit_manipulation/next_higher_number_with_same_number_of_set_bits.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> --------- Co-authored-by: David Leal <halfpacho@gmail.com> Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* Quality of life FIX: initlized sum to 1 instead of adding it before return CHORE: cleaned documentation aswell as adding new documentation, namespace math added * Update math/check_amicable_pair.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/check_amicable_pair.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update math/check_amicable_pair.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update math/check_amicable_pair.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * clang-format and clang-tidy fixes for bc87fea * clang-format and clang-tidy fixes for 0a19d1a --------- Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> Co-authored-by: David Leal <halfpacho@gmail.com> Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
* updating DIRECTORY.md * fix: cleanup longest_common_string.cpp * clang-format and clang-tidy fixes for 3280d46 * docs: explain why utility header is needed * refactor: add test_all() * docs: add relevant doc-strs * refactor: rename to tests() * style: typo fix * style: use string instead of str * Apply suggestions from code review The code after this commit requires reformatting. Co-authored-by: David Leal <halfpacho@gmail.com> * clang-format and clang-tidy fixes for 18203b2 * style: give an exact reason why iostream is needed * style: make all test functions `static` * docs: update missing docs * chore: apply suggestions from code review --------- Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com> Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* doc: fit factorial.cpp to contribution guidelines * Update math/factorial.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * chore: remove redundant include * docs: add documentation for parameter `n` * clang-format and clang-tidy fixes for ec43ea0 --------- Co-authored-by: David Leal <halfpacho@gmail.com> Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* Update approximate_pi.cpp * clang-format and clang-tidy fixes for 5a951bd --------- Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com> Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: rbevin777 <rbevin7@gmail.com> Co-authored-by: David Leal <halfpacho@gmail.com>
* Feat: Iterative factorial * Test: Added tests for iterative factorial * Fix: Added throw when argument exceeds maximum Docs: Updated docs to to explain why maximum is 20 * Feat: iterative_factorial docs: Added documentation to some functions. test: Added exception test. * chore: Fixed formatting * docs: Added documentation, changed examples. * Update math/iterative_factorial.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/iterative_factorial.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/iterative_factorial.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update math/iterative_factorial.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * chore: apply suggestions from code review * Update math/iterative_factorial.cpp Co-authored-by: David Leal <halfpacho@gmail.com> * Update math/iterative_factorial.cpp Co-authored-by: Taj <tjgurwara99@users.noreply.github.com> * Fix: Exception test termination bug * Update math/iterative_factorial.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * Update math/iterative_factorial.cpp Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> --------- Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> Co-authored-by: David Leal <halfpacho@gmail.com> Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
* feat: Treap Data Structure * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: suggested changes * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * fix: add more self-tests * fix: suggested changes Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> * suggested changes Co-authored-by: David Leal <halfpacho@gmail.com> * suggested changes Co-authored-by: David Leal <halfpacho@gmail.com> * suggested changes Co-authored-by: David Leal <halfpacho@gmail.com> * suggested changes Co-authored-by: David Leal <halfpacho@gmail.com> * suggested changes Co-authored-by: David Leal <halfpacho@gmail.com> * suggested changes Co-authored-by: David Leal <halfpacho@gmail.com> * suggested changes Co-authored-by: David Leal <halfpacho@gmail.com> * suggested changes Co-authored-by: David Leal <halfpacho@gmail.com> * suggested changes Co-authored-by: David Leal <halfpacho@gmail.com> * fix: add namespace prefixs * suggested changes Co-authored-by: David Leal <halfpacho@gmail.com> * fix: use containers * fix: add initialization * fix: suggested changes * fix: a few `clang-tidy` warnings * fix: segmentation fault --------- Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com> Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
* [feat/docs]: improve Fenwick Tree algorithm * chore: apply suggestions from code review Co-authored-by: Taj <tjgurwara99@users.noreply.github.com> --------- Co-authored-by: Taj <tjgurwara99@users.noreply.github.com> Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* docs: add documentation in `kruskals_minimum_spanning_tree.cpp` * clang-format and clang-tidy fixes for 4e23439 * chore: remove myself as an author * chore: `std::endl` -> `\n` --------- Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com> Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Originally initiated in #2490. Co-authored-by: Mark Matthew Vergara <mmvergara@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )